import { default as request, cloud } from '@/framework/utils/request'

// 查询列表
export function listInfo() {
  return request({
    url: `${cloud.onlineClass}/studentInfo/list`,
    method: 'get'
  })
}

// 查询详细
export function getInfo(id) {
  return request({
    url: `${cloud.onlineClass}/studentInfo/detail?id=${id}`,
    method: 'get'
  })
}

// 新增
export function addInfo(data) {
  return request({
    url: `${cloud.onlineClass}/studentInfo/add`,
    method: 'post',
    data
  })
}

// 修改
export function updateInfo(data) {
  return request({
    url: `${cloud.onlineClass}/studentInfo/edit`,
    method: 'post',
    data
  })
}

// 删除
export function delInfo(id) {
  return request({
    url: `${cloud.onlineClass}/studentInfo/delete`,
    method: 'post',
    data: { id }
  })
}
